<!DOCTYPE html>
<html>

	<head>

		<meta charset="UTF-8">
		<title>无名杀</title>
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<link href="../../css/style.css" rel="stylesheet" type="text/css" />
		<link href="../../css/read.css" rel="stylesheet" type="text/css" />
		<link rel="shortcut icon" href="../../favicon.ico" />

		<script type="text/javascript" src="../../js/jquery.min.js"></script>
		<script type="text/javascript" src="./list.js"></script>


	</head>

	<style type="text/css">
		
		.aui-search-box {
			display: flex;
		}
		.aui-search-box .anniu {
			width: 100px;
			background: #4e6ef2;
			display: flex;
			align-items: center;
			justify-content: center;
			font-weight: bold;
			font-size: 18px;
			color: #fff;
		}

		.sousuo-box {
			background: #2f3332;
			padding: 100px 0 20px;
		}


		.hanshuLeixing {
			padding-top: 20px;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.hanshuLeixing .name {
			color: #fff;
			font-size: 18px;
		}


		.hanshu-ul {
			padding: 20px;
		}

		.hanshu-li {
			background-color: #faf3e7;
			box-shadow: 2px 2px 2px #ccc;
			border-radius: 10px;
			padding: 20px;
			word-wrap: break-word;
			font-size: 13px;
			margin-bottom: 20px;
		}
	</style>
	<body>
		<div id="app">

			<div class="head">
				<a href="javascript:;" onclick="window.history.go(-1)">
					<div>返回</div>
				</a>
				<a href="../../index.html">
					<div>首页</div>
				</a>
			</div>

			<div class="sousuo-box">
				<div class="aui-search-content">
					<div class="aui-search-box">
						<i class="icon icon-search"></i>
						<input id="searchCityName" type="text" placeholder="无名杀函数查询">
						<span class="anniu" onclick="searchCity()" >搜索</span>
					</div>
				</div>

				<div class="hanshuLeixing">
					<div class="name">函数类型：</div>
					<div><select onchange="xuanze()" id="selsctSM"></select></div>
				</div>

			</div>

			<div class="hanshu-ul">

			</div>

		</div>

		<script type="text/javascript">
			if (!(navigator.userAgent.match(
					/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
				))) {
				$("#app").addClass('app')
				$(".head").css({
					"width": '600px'
				});
			}


			var listKey = Object.keys(wumingshaList)
			for (var i = 0; i < listKey.length; i++) {
				$('#selsctSM').append("<option value='" + i + "' >" + listKey[i] + "</option>")
			}


			function hanshuList(e) {
				var listValue = Object.values(wumingshaList)[e]
				var listValueB = Object.keys(listValue)
				window.listValue = listValue
				window.listValueB = listValueB
				for (var i = 0; i < listValueB.length; i++) {
					$('.hanshu-ul').append("<div class='hanshu-li' onclick='xuanzeB(" + JSON.stringify(listValueB[i]) + ")' >" +
						listValueB[i] + "</div>")
				}
			}
			hanshuList(0)

			function xuanze() {
				$('.hanshu-ul').html("")
				hanshuList($('#selsctSM').val())
			}



			function searchCity() {
				// console.log(list)
				var searchCityName = $("#searchCityName").val();
				if (searchCityName == "") {
					alert("输入搜索函数")
				} else {
					// console.log(window.listValueB)

					$('.hanshu-ul').html("")
					for (var i = 0; i < listValueB.length; i++) {
						var num = listValueB[i].indexOf(searchCityName)
						if (num != -1) {
							$('.hanshu-ul').append("<div class='hanshu-li' onclick='xuanzeB(" + JSON.stringify(listValueB[i]) +
								")'>" + listValueB[i] + "</div>")
						}
					}

				}
			}

			function xuanzeB(e) {
				// console.log(window.listValue[e])
				var shuomingData = window.listValue[e]
				window.listValue[e].name = e

				sessionStorage.setItem("hanshuShuoming", JSON.stringify(shuomingData));
				window.location.href = "./content.html"
			}
		</script>

	</body>

</html>
